
import React from 'react'
import { useLocation } from 'react-router-dom';
//包装对象
import qs from 'qs'

export default function Music() {

  const location = useLocation()
  // console.log("location",location);
  const {music,id} = qs.parse(location.search.split('?')[1])
  
  return (
    <div>
      <p>歌曲的名字：{music}</p>
      <p>编号：{id}</p>
    </div>
  )
}
